<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>个人密码修改</title>
		<link rel="stylesheet" href="__PUBLIC__/frame/layui/css/layui.css">
		<!--<link rel="stylesheet" href="http://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css">-->
		<link rel="stylesheet" href="__PUBLIC__/frame/static/css/style.css">
	</head>
	<body>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
          <legend style="font-size: 14px;">个人密码修改</legend>
        </fieldset>
		<form class="layui-form layui-form-pane" method="post" action="__SELF__">
			<input type="hidden" name="id" value="<?php echo $data['id']; ?>" />
			<div class="layui-form-item">
			    <label class="layui-form-label">用户名</label>
			    <div class="layui-input-block">
			    	<input type="hidden" name="username" lay-verify="title" autocomplete="off" placeholder="请输入用户名" value="<?php echo $data['username']?>" class="layui-input">
			      	<input type="text" lay-verify="title" autocomplete="off" placeholder="请输入用户名" value="<?php echo $data['username']?>" disabled class="layui-input">
			    </div>
			</div>
			<div class="layui-form-item">
			    <label class="layui-form-label">姓名</label>
			    <div class="layui-input-block">
			      <input type="text" name="nickname" lay-verify="title" autocomplete="off" placeholder="请输入用户名" value="<?php echo $data['nickname']?>" class="layui-input">
			    </div>
			</div>
			<div class="layui-form-item">
			    <label class="layui-form-label">密码</label>
			    <div class="layui-input-block">
			      <input type="password" name="password" lay-verify="pass" placeholder="请填写新密码" autocomplete="off" class="layui-input">
			    </div>
			</div>
			<div class="layui-form-item">
			    <label class="layui-form-label">确认密码</label>
			    <div class="layui-input-block">
			      <input type="password" name="repassword" lay-verify="pass" placeholder="请确认新密码" autocomplete="off" class="layui-input">
			    </div>
			</div>	
			<div class="layui-form-item">
			    <div class="layui-input-block">
			      <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
			      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
			    </div>
			</div>
	    </form>
	</body>
	<script type="text/javascript" src="__PUBLIC__/hawk/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/hawk/js/public.js"></script>
	<script type="text/javascript" src="__PUBLIC__/frame/layui/layui.js"></script>
	<script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  $(document).on('blur','input[name=repassword]',function(){
  	var password = $("input[name=password]").val();
  	var repassword = $("input[name=repassword]").val();
  	if(password!=repassword){
  		layer.alert('两次密码不相同！');
  	}
  }); 
});
	</script>
</html>
